From 0e5f8e24af525a1f9a441305b1c7d24c4fcf9cda Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 7 Mar 2022 11:26:25 +0100 Subject: [PATCH] Report buffer-name when local mode-line is invalid * lisp/files.el (hack-local-variables-prop-line): Add '(buffer-name)' to the message reporting the malformed mode-line. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index eca8cba93f2..a0bc5bf2626 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3741,8 +3741,8 @@ return as the symbol specifying the mode." (while (not (or (and (eq handle-mode t) result) (>= (point) end))) (unless (looking-at hack-local-variable-regexp) - (message "Malformed mode-line: %S" - (buffer-substring-no-properties (point) end)) + (message "Malformed mode-line: %S in buffer %S" + (buffer-substring-no-properties (point) end) (buffer-name)) (throw 'malformed-line nil)) (goto-char (match-end 0)) ;; There used to be a downcase here, -- 2.30.2